/****** Object: Table [dbo].[Orders]   Script Date: 06.07.2011 14:25:03 ******/
USE [SoftServeProject];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE TABLE [dbo].[Orders] (
[id_orders] int IDENTITY(1, 1) NOT NULL,
[id_basket] int NOT NULL,
[date] varchar(10) COLLATE Ukrainian_CI_AS NOT NULL,
[id_paymentMethod] int NOT NULL,
[id_deliveryOption] int NOT NULL,
[id_deliveryStatus] int NOT NULL,
CONSTRAINT [PK__Orders__0425A276]
PRIMARY KEY NONCLUSTERED ([id_orders] ASC)
WITH ( PAD_INDEX = OFF,
FILLFACTOR = 100,
IGNORE_DUP_KEY = OFF,
STATISTICS_NORECOMPUTE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON )
 ON [PRIMARY],
CONSTRAINT [FK__Orders__id_baske__4222D4EF]
FOREIGN KEY ([id_basket])
REFERENCES [dbo].[Basket] ( [id_basket] ),
CONSTRAINT [FK__Orders__id_payme__4316F928]
FOREIGN KEY ([id_paymentMethod])
REFERENCES [dbo].[PaymentMethod] ( [id_paymentMethod] ),
CONSTRAINT [FK__Orders__id_deliv__440B1D61]
FOREIGN KEY ([id_deliveryOption])
REFERENCES [dbo].[deliveryOption] ( [id_deliveryOption] ),
CONSTRAINT [FK__Orders__id_deliv__44FF419A]
FOREIGN KEY ([id_deliveryStatus])
REFERENCES [dbo].[deliveryStatus] ( [id_deliveryStatus] )
)
ON [PRIMARY];
GO




